define(()=>{
    var template=`
    <div class="c-two-right">
        <h3 class="c-h3">显示组员</h3>

        <div class="c-whole">
            <div class="c-switch">
                <h4 class="click-switch">
                    <i-select v-model="whole" placeholder="海南省">
                        <i-option v-for="item in areaWhole" :value="item.value" :key="item">{{ item.label }}
                        </i-option>
                    </i-select>
                </h4>
                <div class="switch-box">
                    <Tree :data="baseData" show-checkbox></Tree>
                </div>
            </div>
        </div>
    </div>
    `;

    var MemberPannel={
        name:"member-pannel",
        template:template,
        data: function () {
            return {

                /*区域的筛选*/
                areaWhole: [
                    {
                        value: 'hainan',
                        label: '海南省'
                    },
                    {
                        value: 'haikou',
                        label: '海口市'
                    },
                    {
                        value: 'chengmai',
                        label: '澄迈县'
                    },
                    {
                        value: 'wenchang',
                        label: '文昌市'
                    }
                ],
                whole: '',

                /*显示组员*/
                baseData: [

                    {
                        expand: true,
                        title: '海口市<span">(1233)</span>',
                        children: [{
                            title: '龙华区<span">(1233)</span>',
                            expand: true,
                            children: [{
                                title: '国贸区<span">(1233)</span>',
                            }, {
                                title: '国贸区<span">(1233)</span>',
                            }]
                        },
                            {
                                title: '美兰区<span">(1233)</span>',
                                expand: true,
                                children: [{
                                    title: '南沙区<span">(1233)</span>',
                                }, {
                                    title: '南沙区<span">(1233)</span>',
                                }]
                            }
                        ],

                    },
                    {
                        expand: true,
                        title: '海口市<span">(1233)</span>',
                        children: [{
                            title: '龙华区<span">(1233)</span>',
                            expand: true,
                            children: [{
                                title: '国贸区<span">(1233)</span>',
                            }, {
                                title: '国贸区<span">(1233)</span>',
                            }]
                        },
                            {
                                title: '美兰区<span">(1233)</span>',
                                expand: true,
                                children: [{
                                    title: '南沙区<span">(1233)</span>',
                                }, {
                                    title: '南沙区<span">(1233)</span>',
                                }]
                            }
                        ],

                    }
                ]

            }
        },
        methods:{
            search:function(){
                $.get(function(data){
                    window.bus.$emit(data);//通过 bus 发布事件.
                });
            }
        }
    }
    return MemberPannel
})
